import Vue from 'vue'
import './cube-ui'
import App from './App.vue'
import router from '@/routes'
// import store from './store/store'
declare const window: any;
import Cube from 'cube-ui';

import '@/styles/base.less';
import '@/styles/material.less';
import { TaskType, OrderStatus, Platform } from '@/utils/constants';
// import VueQrcode from 'vue-qrcode';
import VueQrcode from '@chenfengyuan/vue-qrcode';

Vue.use(Cube);
Vue.config.productionTip = false;

Vue.component(VueQrcode.name, VueQrcode);

Vue.filter('TaskType', (val: any) => {
  let status = 'Unknown Type'
  if (val) {
    status = TaskType[val];
  }
  return status;
});



Vue.filter('OrderStatus', (val: any) => {
  let status = 'Unknown Type'
  if (val) {
    status = OrderStatus[val];
  }
  return status;
});


Vue.filter('Platform', (val: any) => {
  let status = 'Unknown Type'
  if (val) {
    status = Platform[val];
  }
  return status;
});



document.addEventListener('DOMContentLoaded', () => {
  const $Vue = new Vue({
    router,
    // store,
    render: h => h(App)
  });
  window.$Vue = $Vue;
  $Vue.$mount('#app');
});



